// Created from GenerationTemplate
// For Decisions HL7 Engine
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using System.Reflection;
using DecisionsFramework.Design.Properties;
using Decisions.HL7.Generated.AbstractMessage;
using Decisions.HL7.DataTypes;
using ST = System.String;
using SI = System.String;
using TX = System.String;
using FT = System.String;
using IS = System.String;
using ID = System.String;
using SNM = System.String;

namespace Decisions.HL7.Message
{
    [DataContract]
	public class OM7 : AbstractSegment
    {

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("1 Sequence Number - Test/Observation Master File",1)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.True,"NM")]
	    public NM SequenceNumberTestObservationMasterFile {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("2 Universal Service Identifier",2)]
  	    [HL7Field(HL7Version.v24, 2, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v25, 2, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v251, 2, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v26, 2, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 2, HL7Repeat.False, HL7Required.True,"CWE")]
	    public CWE UniversalServiceIdentifier {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("3 Category Identifier",3)]
  	    [HL7Field(HL7Version.v24, 3, HL7Repeat.True, HL7Required.True,"CE_0412")]
  	    [HL7Field(HL7Version.v25, 3, HL7Repeat.True, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v251, 3, HL7Repeat.True, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v26, 3, HL7Repeat.True, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 3, HL7Repeat.True, HL7Required.True,"CWE")]
		[CategoryIdentifier]
	    public CWE[] CategoryIdentifier {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("4 Category Description",4)]
  	    [HL7Field(HL7Version.v24, 4, HL7Repeat.False, HL7Required.True,"TX")]
  	    [HL7Field(HL7Version.v25, 4, HL7Repeat.False, HL7Required.True,"TX")]
  	    [HL7Field(HL7Version.v251, 4, HL7Repeat.False, HL7Required.True,"TX")]
  	    [HL7Field(HL7Version.v26, 4, HL7Repeat.False, HL7Required.True,"TX")]
  	    [HL7Field(HL7Version.v27, 4, HL7Repeat.False, HL7Required.True,"TX")]
	    public TX CategoryDescription {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("5 Category Synonym",5)]
  	    [HL7Field(HL7Version.v24, 5, HL7Repeat.True, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v25, 5, HL7Repeat.True, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v251, 5, HL7Repeat.True, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v26, 5, HL7Repeat.True, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v27, 5, HL7Repeat.True, HL7Required.True,"ST")]
	    public ST[] CategorySynonym {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("6 Effective Test/Service Start Date/Time",6)]
  	    [HL7Field(HL7Version.v24, 6, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v25, 6, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v251, 6, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v26, 6, HL7Repeat.False, HL7Required.True,"DTM")]
  	    [HL7Field(HL7Version.v27, 6, HL7Repeat.False, HL7Required.True,"DTM")]
	    public DTM EffectiveTestServiceStartDateTime {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("7 Effective Test/Service End Date/Time",7)]
  	    [HL7Field(HL7Version.v24, 7, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v25, 7, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v251, 7, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v26, 7, HL7Repeat.False, HL7Required.True,"DTM")]
  	    [HL7Field(HL7Version.v27, 7, HL7Repeat.False, HL7Required.True,"DTM")]
	    public DTM EffectiveTestServiceEndDateTime {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("8 Test/Service Default Duration Quantity",8)]
  	    [HL7Field(HL7Version.v24, 8, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v25, 8, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v251, 8, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v26, 8, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v27, 8, HL7Repeat.False, HL7Required.True,"NM")]
	    public NM TestServiceDefaultDurationQuantity {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("9 Test/Service Default Duration Units",9)]
  	    [HL7Field(HL7Version.v24, 9, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v25, 9, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v251, 9, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v26, 9, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 9, HL7Repeat.False, HL7Required.True,"CWE")]
		[notableforCE]
	    public CWE TestServiceDefaultDurationUnits {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("10 Test/Service Default Frequency",10)]
  	    [HL7Field(HL7Version.v24, 10, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v25, 10, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v251, 10, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v26, 10, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v27, 10, HL7Repeat.False, HL7Required.True,"CWE")]
	    public CWE TestServiceDefaultFrequency {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("11 Consent Indicator",11)]
  	    [HL7Field(HL7Version.v24, 11, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v25, 11, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v251, 11, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v26, 11, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v27, 11, HL7Repeat.False, HL7Required.True,"ID")]
		[YesnoIndicator]
	    public ID ConsentIndicator {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("12 Consent Identifier",12)]
  	    [HL7Field(HL7Version.v24, 12, HL7Repeat.False, HL7Required.True,"CE_0413")]
  	    [HL7Field(HL7Version.v25, 12, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v251, 12, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v26, 12, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 12, HL7Repeat.False, HL7Required.True,"CWE")]
		[ConsentIdentifier]
	    public CWE ConsentIdentifier {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("13 Consent Effective Start Date/Time",13)]
  	    [HL7Field(HL7Version.v24, 13, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v25, 13, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v251, 13, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v26, 13, HL7Repeat.False, HL7Required.True,"DTM")]
  	    [HL7Field(HL7Version.v27, 13, HL7Repeat.False, HL7Required.True,"DTM")]
	    public DTM ConsentEffectiveStartDateTime {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("14 Consent Effective End Date/Time",14)]
  	    [HL7Field(HL7Version.v24, 14, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v25, 14, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v251, 14, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v26, 14, HL7Repeat.False, HL7Required.True,"DTM")]
  	    [HL7Field(HL7Version.v27, 14, HL7Repeat.False, HL7Required.True,"DTM")]
	    public DTM ConsentEffectiveEndDateTime {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("15 Consent Interval Quantity",15)]
  	    [HL7Field(HL7Version.v24, 15, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v25, 15, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v251, 15, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v26, 15, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v27, 15, HL7Repeat.False, HL7Required.True,"NM")]
	    public NM ConsentIntervalQuantity {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("16 Consent Interval Units",16)]
  	    [HL7Field(HL7Version.v24, 16, HL7Repeat.False, HL7Required.True,"CE_0414")]
  	    [HL7Field(HL7Version.v25, 16, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v251, 16, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v26, 16, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 16, HL7Repeat.False, HL7Required.True,"CWE")]
		[UnitsofTime]
	    public CWE ConsentIntervalUnits {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("17 Consent Waiting Period Quantity",17)]
  	    [HL7Field(HL7Version.v24, 17, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v25, 17, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v251, 17, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v26, 17, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v27, 17, HL7Repeat.False, HL7Required.True,"NM")]
	    public NM ConsentWaitingPeriodQuantity {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("18 Consent Waiting Period Units",18)]
  	    [HL7Field(HL7Version.v24, 18, HL7Repeat.False, HL7Required.True,"CE_0414")]
  	    [HL7Field(HL7Version.v25, 18, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v251, 18, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v26, 18, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 18, HL7Repeat.False, HL7Required.True,"CWE")]
		[UnitsofTime]
	    public CWE ConsentWaitingPeriodUnits {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("19 Effective Date/Time of Change",19)]
  	    [HL7Field(HL7Version.v24, 19, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v25, 19, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v251, 19, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v26, 19, HL7Repeat.False, HL7Required.True,"DTM")]
  	    [HL7Field(HL7Version.v27, 19, HL7Repeat.False, HL7Required.True,"DTM")]
	    public DTM EffectiveDateTimeofChange {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("20 Entered By",20)]
  	    [HL7Field(HL7Version.v24, 20, HL7Repeat.False, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v25, 20, HL7Repeat.False, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v251, 20, HL7Repeat.False, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v26, 20, HL7Repeat.False, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v27, 20, HL7Repeat.False, HL7Required.True,"XCN")]
	    public XCN EnteredBy {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("21 Orderable-at Location",21)]
  	    [HL7Field(HL7Version.v24, 21, HL7Repeat.True, HL7Required.True,"PL")]
  	    [HL7Field(HL7Version.v25, 21, HL7Repeat.True, HL7Required.True,"PL")]
  	    [HL7Field(HL7Version.v251, 21, HL7Repeat.True, HL7Required.True,"PL")]
  	    [HL7Field(HL7Version.v26, 21, HL7Repeat.True, HL7Required.True,"PL")]
  	    [HL7Field(HL7Version.v27, 21, HL7Repeat.True, HL7Required.True,"PL")]
	    public PL[] OrderableatLocation {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("22 Formulary Status",22)]
  	    [HL7Field(HL7Version.v24, 22, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v25, 22, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v251, 22, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v26, 22, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v27, 22, HL7Repeat.False, HL7Required.True,"CWE")]
		[FormularyStatus]
	    public CWE FormularyStatus {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("23 Special Order Indicator",23)]
  	    [HL7Field(HL7Version.v24, 23, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v25, 23, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v251, 23, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v26, 23, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v27, 23, HL7Repeat.False, HL7Required.True,"ID")]
		[YesnoIndicator]
	    public ID SpecialOrderIndicator {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("24 Primary Key Value - CDM",24)]
  	    [HL7Field(HL7Version.v24, 24, HL7Repeat.True, HL7Required.True,"CE_0132")]
  	    [HL7Field(HL7Version.v25, 24, HL7Repeat.True, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v251, 24, HL7Repeat.True, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v26, 24, HL7Repeat.True, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 24, HL7Repeat.True, HL7Required.True,"CWE")]
		[TransactionCode]
	    public CWE[] PrimaryKeyValueCDM {get;set;}


	    [DataMember]
        [PropertyClassification("AdditionalValue1", 25)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue1 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue2", 26)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue2 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue3", 27)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue3 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue4", 28)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue4 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue5", 29)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue5 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue6", 30)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue6 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue7", 31)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue7 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue8", 32)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue8 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue9", 33)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue9 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue10", 34)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue10 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue11", 35)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue11 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue12", 36)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue12 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue13", 37)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue13 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue14", 38)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue14 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue15", 39)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue15 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue16", 40)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue16 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue17", 41)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue17 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue18", 42)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue18 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue19", 43)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue19 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue20", 44)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue20 { get; set; }

	

		internal override void ConsumeTextSegment(string segmentTextData, HL7ParserOptions options)
		{
			string[] segmentTextParts = segmentTextData.Split(new char[] { options.FieldSep }, StringSplitOptions.None);
			SequenceNumberTestObservationMasterFile = (NM)ParseTextAtPositionIntoData(segmentTextParts, 1, options, typeof(NM), "OM7.1");
			UniversalServiceIdentifier = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 2, options, typeof(CWE), "OM7.2");
	    	CategoryIdentifier = (CWE[])ParseTextAtPositionIntoDataArray<CWE>(segmentTextParts, 3, options, "OM7.3");
			CategoryDescription = (TX)ParseTextAtPositionIntoData(segmentTextParts, 4, options, typeof(TX), "OM7.4");
	    	CategorySynonym = (ST[])ParseTextAtPositionIntoDataArray<ST>(segmentTextParts, 5, options, "OM7.5");
			EffectiveTestServiceStartDateTime = (DTM)ParseTextAtPositionIntoData(segmentTextParts, 6, options, typeof(DTM), "OM7.6");
			EffectiveTestServiceEndDateTime = (DTM)ParseTextAtPositionIntoData(segmentTextParts, 7, options, typeof(DTM), "OM7.7");
			TestServiceDefaultDurationQuantity = (NM)ParseTextAtPositionIntoData(segmentTextParts, 8, options, typeof(NM), "OM7.8");
			TestServiceDefaultDurationUnits = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 9, options, typeof(CWE), "OM7.9");
			TestServiceDefaultFrequency = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 10, options, typeof(CWE), "OM7.10");
			ConsentIndicator = (ID)ParseTextAtPositionIntoData(segmentTextParts, 11, options, typeof(ID), "OM7.11");
			ConsentIdentifier = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 12, options, typeof(CWE), "OM7.12");
			ConsentEffectiveStartDateTime = (DTM)ParseTextAtPositionIntoData(segmentTextParts, 13, options, typeof(DTM), "OM7.13");
			ConsentEffectiveEndDateTime = (DTM)ParseTextAtPositionIntoData(segmentTextParts, 14, options, typeof(DTM), "OM7.14");
			ConsentIntervalQuantity = (NM)ParseTextAtPositionIntoData(segmentTextParts, 15, options, typeof(NM), "OM7.15");
			ConsentIntervalUnits = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 16, options, typeof(CWE), "OM7.16");
			ConsentWaitingPeriodQuantity = (NM)ParseTextAtPositionIntoData(segmentTextParts, 17, options, typeof(NM), "OM7.17");
			ConsentWaitingPeriodUnits = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 18, options, typeof(CWE), "OM7.18");
			EffectiveDateTimeofChange = (DTM)ParseTextAtPositionIntoData(segmentTextParts, 19, options, typeof(DTM), "OM7.19");
			EnteredBy = (XCN)ParseTextAtPositionIntoData(segmentTextParts, 20, options, typeof(XCN), "OM7.20");
	    	OrderableatLocation = (PL[])ParseTextAtPositionIntoDataArray<PL>(segmentTextParts, 21, options, "OM7.21");
			FormularyStatus = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 22, options, typeof(CWE), "OM7.22");
			SpecialOrderIndicator = (ID)ParseTextAtPositionIntoData(segmentTextParts, 23, options, typeof(ID), "OM7.23");
	    	PrimaryKeyValueCDM = (CWE[])ParseTextAtPositionIntoDataArray<CWE>(segmentTextParts, 24, options, "OM7.24");
		}

		public string GetER7(HL7ParserOptions options) {
			List<string> segmentParts = new List<string>();
			segmentParts.Add("OM7");
			segmentParts.Add(GetER7TextForSegmentPart(SequenceNumberTestObservationMasterFile, options));
			segmentParts.Add(GetER7TextForSegmentPart(UniversalServiceIdentifier, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(CategoryIdentifier, options));
		    segmentParts.Add(CategoryDescription);
		    segmentParts.Add(ConvertStringArray(CategorySynonym, options));
			segmentParts.Add(GetER7TextForSegmentPart(EffectiveTestServiceStartDateTime, options));
			segmentParts.Add(GetER7TextForSegmentPart(EffectiveTestServiceEndDateTime, options));
			segmentParts.Add(GetER7TextForSegmentPart(TestServiceDefaultDurationQuantity, options));
			segmentParts.Add(GetER7TextForSegmentPart(TestServiceDefaultDurationUnits, options));
			segmentParts.Add(GetER7TextForSegmentPart(TestServiceDefaultFrequency, options));
		    segmentParts.Add(ConsentIndicator);
			segmentParts.Add(GetER7TextForSegmentPart(ConsentIdentifier, options));
			segmentParts.Add(GetER7TextForSegmentPart(ConsentEffectiveStartDateTime, options));
			segmentParts.Add(GetER7TextForSegmentPart(ConsentEffectiveEndDateTime, options));
			segmentParts.Add(GetER7TextForSegmentPart(ConsentIntervalQuantity, options));
			segmentParts.Add(GetER7TextForSegmentPart(ConsentIntervalUnits, options));
			segmentParts.Add(GetER7TextForSegmentPart(ConsentWaitingPeriodQuantity, options));
			segmentParts.Add(GetER7TextForSegmentPart(ConsentWaitingPeriodUnits, options));
			segmentParts.Add(GetER7TextForSegmentPart(EffectiveDateTimeofChange, options));
			segmentParts.Add(GetER7TextForSegmentPart(EnteredBy, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(OrderableatLocation, options));
			segmentParts.Add(GetER7TextForSegmentPart(FormularyStatus, options));
		    segmentParts.Add(SpecialOrderIndicator);
		    segmentParts.Add(GetER7TextForSegmentArrayPart(PrimaryKeyValueCDM, options));
			return string.Join("" + options.FieldSep, segmentParts.ToArray());
		}

    }
}

